package week9.shisi;

/**
 * Created by mc on 2017/4/13.
 */

public class txt4
{
    public static void main(String[] arges)
    {
        check();

    }
    public static void check()
    {
        String qq = "12345";
        int len;
        len = qq.length();
        if(len>=5&&len<=15)
        {
            if(!qq.startsWith("0"))
            {
                try {
                    long l = Long.parseLong(qq);
                }
                catch(NumberFormatException e)
                {
                    System.out.println("出现非法字符");
                }
            }
            else
            {
                System.out.println("不可以0开头");
            }
        }
    }
}
